﻿@using EquipmentAlarmSystem.Service.Models.Enum
@model PermissionManagementModel

@{
    ViewData["Title"] = "权限管理";
}

<partial name="_SystemConfiguration" />


<style>
    table {
        border-collapse: collapse; /* 合并表格边框为一个单一的边框 */
        margin: 0 auto;
    }

    table, th, td {
        border: 1px solid black; /* 设置表格、表头和表格单元格的边框为1像素宽的黑色实线 */
        text-align: center; /* 水平居中 */
    }

    input {
        border: none;
        width: 100%;
        text-align: center; /* 水平居中 */
    }

    select {
        border: none;
        width: 100%;
        text-align: center; /* 水平居中 */
    }

    tr {
        height: 35px;
    }
</style>

<table>
    <tr>
        <th width="200px">编号</th>
        <th width="200px">名称</th>
        <th width="200px">分组</th>
        <th width="80px"></th>
    </tr>

    @foreach (var item in Model.EquipmentGroup)
    {
        <form action="/AuthorizationManagement/PermissionManagement" method="post">
        <tr>
            <th width="200px"><input type="text" name="Id" value="@item.Id" readonly></th>
            <th width="200px"><input type="text" name="Name" value="@item.Name" readonly></th>
            <th width="100px">
                <select name="Grouping" asp-for="@item.Grouping">
                        @foreach (var items in Model.Grouping)
                        {
                        <option value="@items">@items</option>
                        }
                </select>
            </th>
            <th width="80px"><input type="submit" value="提交"></th>
        </tr>
        </form>
    }
</table>
@if (Model.Content is not null && Model.Content.Length > 1)
{
    <hr>
    <h1>@Model.Content</h1>
}
